import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import Layui from '@layui/layui-vue'
import '@layui/layui-vue/lib/index.css'
import router from './router/index'

createApp(App).use(Layui).use(router).mount('#app')

router.beforeEach((to, from, next) => {
  console.log(to, from)
  if (to.meta.title) {
    document.title = to.meta.title as string
  }
  next()
})
